package com.wd.tw.service;

import java.util.List;
import com.wd.common.utils.DateUtils;
import javax.annotation.Resource;

import com.wd.tw.domain.entity.ElevatorRunRecord;
import com.wd.tw.mapper.ElevatorRunRecordMapper;
import org.springframework.stereotype.Service;


/**
 * 电梯运行信息Service业务层处理
 * 
 * @author liumingkun
 * @date 2024-12-19
 */
@Service
public class ElevatorRunRecordService
{
    @Resource
    private ElevatorRunRecordMapper elevatorRunRecordMapper;

    /**
     * 查询电梯运行信息
     *
     * @param recordId 电梯运行信息主键
     * @return 电梯运行信息
     */
    public ElevatorRunRecord selectElevatorRunRecordByRecordId(Long recordId)
    {
        return elevatorRunRecordMapper.selectElevatorRunRecordByRecordId(recordId);
    }

    /**
     * 查询电梯运行信息列表
     *
     * @param elevatorRunRecord 电梯运行信息
     * @return 电梯运行信息
     */
    public List<ElevatorRunRecord> selectElevatorRunRecordList(ElevatorRunRecord elevatorRunRecord)
    {
        return elevatorRunRecordMapper.selectElevatorRunRecordList(elevatorRunRecord);
    }

    /**
     * 新增电梯运行信息
     *
     * @param elevatorRunRecord 电梯运行信息
     * @return 结果
     */
    public int insertElevatorRunRecord(ElevatorRunRecord elevatorRunRecord)
    {
        elevatorRunRecord.setCreateTime(DateUtils.getNowDate());
        return elevatorRunRecordMapper.insertElevatorRunRecord(elevatorRunRecord);
    }

    /**
     * 修改电梯运行信息
     *
     * @param elevatorRunRecord 电梯运行信息
     * @return 结果
     */
    public int updateElevatorRunRecord(ElevatorRunRecord elevatorRunRecord)
    {
        elevatorRunRecord.setUpdateTime(DateUtils.getNowDate());
        return elevatorRunRecordMapper.updateElevatorRunRecord(elevatorRunRecord);
    }

    /**
     * 批量删除电梯运行信息
     *
     * @param recordIds 需要删除的电梯运行信息主键
     * @return 结果
     */
    public int deleteElevatorRunRecordByRecordIds(Long[] recordIds)
    {
        return elevatorRunRecordMapper.deleteElevatorRunRecordByRecordIds(recordIds);
    }

    /**
     * 删除电梯运行信息信息
     *
     * @param recordId 电梯运行信息主键
     * @return 结果
     */
    public int deleteElevatorRunRecordByRecordId(Long recordId)
    {
        return elevatorRunRecordMapper.deleteElevatorRunRecordByRecordId(recordId);
    }
}
